---
created:
  source_filename: /home/runner/work/mkdocs-mknodes/mkdocs-mknodes/.venv/lib/python3.13/site-packages/anyenv/async_run.py
  source_function: run_sync.<locals>.wrapper
  source_line_no: 52
hide:
- toc
title: Creating a website via config
---

It is possible to construct a basic documentation websites for without much effort. We will construct a small
website for MkDocs.

The following config...

``` {.yaml }
INHERIT: mkdocs_shared.yml

site_name: MkDocs
site_description: A MkDocs page created by MkNodes
repo_url: "https://github.com/mkdocs/mkdocs/"
site_url: https://phil65.github.io/mknodes/mkdocs/
plugins:
    - mknodes:
          repo_path: https://github.com/mkdocs/mkdocs.git
          clone_depth: 100
          build_fn: mkdocs_mknodes:parse
          kwargs:
              pages:
                  - title: Home
                    type: MkText
                    text: "``` py title='__main__.create_github_index_md' linenums="86" hl_lines="3"
def create_github_index_md() -> mk.MkPage:
    page = mk.MkPage("Github index")
    page += mk.MkCode.for_object(create_github_index_md)
    page += mk.MkHeader("MkNodes", level=1)
    page += mk.MkHeader("Don't write docs. Code them.", level=4)
    page += mk.MkShields()
    page += mk.MkLink(DOC_URL, "Read the completely coded documentation!")
    page += mk.MkInstallGuide(header="How to install")
    page += mk.MkHeader("All the nodes!")
    page += mk.MkClassDiagram(mk.MkNode, mode="subclasses", direction="LR")
    return page

```

# MkNodes (Mkdocs Plugin)

#### Don't write docs. Code them.

[![PyPI License](https://img.shields.io/pypi/l/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Package status](https://img.shields.io/pypi/status/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Daily downloads](https://img.shields.io/pypi/dd/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Weekly downloads](https://img.shields.io/pypi/dw/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Monthly downloads](https://img.shields.io/pypi/dm/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Distribution format](https://img.shields.io/pypi/format/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Wheel availability](https://img.shields.io/pypi/wheel/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Python version](https://img.shields.io/pypi/pyversions/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Implementation](https://img.shields.io/pypi/implementation/mkdocs-mknodes.svg)](https://pypi.org/project/mkdocs-mknodes/)
[![Releases](https://img.shields.io/github/downloads/phil65/mkdocs_mknodes/total.svg)](https://github.com/phil65/mkdocs_mknodes/releases)
[![Github Contributors](https://img.shields.io/github/contributors/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/graphs/contributors)
[![Github Discussions](https://img.shields.io/github/discussions/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/discussions)
[![Github Forks](https://img.shields.io/github/forks/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/forks)
[![Github Issues](https://img.shields.io/github/issues/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/issues)
[![Github Issues](https://img.shields.io/github/issues-pr/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/pulls)
[![Github Watchers](https://img.shields.io/github/watchers/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/watchers)
[![Github Stars](https://img.shields.io/github/stars/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/stars)
[![Github Repository size](https://img.shields.io/github/repo-size/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes)
[![Github last commit](https://img.shields.io/github/last-commit/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/commits)
[![Github release date](https://img.shields.io/github/release-date/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes/releases)
[![Github language count](https://img.shields.io/github/languages/count/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes)
[![Github commits this week](https://img.shields.io/github/commit-activity/w/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes)
[![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes)
[![Github commits this year](https://img.shields.io/github/commit-activity/y/phil65/mkdocs_mknodes)](https://github.com/phil65/mkdocs_mknodes)
[![Package status](https://codecov.io/gh/phil65/mkdocs_mknodes/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/mkdocs_mknodes/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyUp](https://pyup.io/repos/github/phil65/mkdocs_mknodes/shield.svg)](https://pyup.io/repos/github/phil65/mkdocs_mknodes/)

[Read the completely coded documentation!](https://phil65.github.io/mkdocs-mknodes/)

## How to install

### pip

The latest released version is available at the [Python package index](https://pypi.org/project/mknodes).

``` py
pip install mkdocs-mknodes
```
"
                    is_index: true
                  - Usage:
                        - type: MkTemplate
                          title: Getting started
                          template: https://raw.githubusercontent.com/mkdocs/mkdocs/master/docs/getting-started.md
                        - type: MkTemplate
                          title: Configuration
                          template: https://raw.githubusercontent.com/mkdocs/mkdocs/master/docs/user-guide/configuration.md
                        - type: MkTemplate
                          title: Deploying your docs
                          template: https://raw.githubusercontent.com/mkdocs/mkdocs/master/docs/user-guide/deploying-your-docs.md
                        - type: MkTemplate
                          title: Installation
                          template: https://raw.githubusercontent.com/mkdocs/mkdocs/master/docs/user-guide/installation.md
                  - title: API
                    type: MkDoc
                    section_name: "API"
                    recursive: true
                  - title: CLI
                    type: MkCliDoc
                    show_subcommands: true
                    condition: "typer"
                  - Development:
                        - title: Changelog
                          type: MkChangelog
                        - title: Code of Conduct
                          type: MkCodeOfConduct
                        - title: Contributing
                          type: MkCommitConventions
                        # - title: Pull requests
                        #   type: MkPullRequestGuidelines
                        - title: Dependencies
                          type: MkPage
                          items:
                              - title: Dependency table
                                type: MkDependencyTable
                              - title: Dependency tree
                                type: MkPipDepTree
                                direction: LR
                        - title: Dependencies
                          type: MkDependencyTable
                        - title: MkDocs Plugins
                          condition: 'True'
                          type: MkPluginFlow
                        - title: License
                          type: MkLicense

```

Combined with this CLI call...

``` {.terminal }
mkdocs-mknodes build
```


Will create this website:


[:mdi-web: https://phil65.github.io/mkdocs-mknodes/mkdocs](https://phil65.github.io/mkdocs-mknodes/mkdocs){: .md-button}
